package com.srzk.youthleagueback.mapper;

import com.srzk.youthleagueback.pojo.ThematicPic;
import org.apache.ibatis.annotations.*;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface ThematicPicMapper {
    @Insert("insert into thematic_pic (id,picture)" +
            "values (#{thematic_pic.id}, #{thematic_pic.picture})")
    int insert(@Param("thematic_pic") ThematicPic record);

    @Select("SELECT * FROM thematic_pic WHERE id = #{id}")
    List<ThematicPic> selectByPrimaryKeyList(Long id);

    List<ThematicPic> selectAll();

    @Delete("DELETE FROM thematic_pic WHERE id = #{id}")
    int deleteByUserAndYearAndTypeAndId(@Param("id")Long id);
}